package com.peanut.dto;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 *
 * </p>
 *
 * @author author
 * @since 2022-05-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tab_item")
@Document(indexName = "tab_item", shards = 3, replicas = 1)
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TabItemDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @Id
    private Long _id;

    /**
     * 发布人id
     */
    @Field(type = FieldType.Keyword,name = "item_user_id")
    private Long itemUserId;

    /**
     * 商品名称
     */
    @Field(type = FieldType.Keyword,name = "item_name")
    private String itemName;

    /**
     * 上牌时间
     */
    @Field(type = FieldType.Date,format = DateFormat.date,name = "item_registered_date")
    private Date itemRegisteredDate;

    /**
     *
     * 行驶里程
     */
    @Field(type = FieldType.Keyword,name = "item_road_haul")
    private Long itemRoadHaul;

    /**
     * 估价
     */
    @Field(type = FieldType.Keyword,name = "item_evaluate")
    private String itemEvaluate;

    /**
     * 验车地址
     */
    @Field(type = FieldType.Keyword,name = "item_validate")
    private String itemValidate;

    /**
     * 排放标准(国四:1,国五:2,国六:3,国六b:4)
     */
    @Field(type = FieldType.Keyword,name = "item_emission_standard")
    private Integer itemEmissionStandard;

    /**
     * 上牌城市
     */
    @Field(type = FieldType.Keyword,name = "item_city")
    private Integer itemCity;

    /**
     * 当前售价
     */
    @Field(type = FieldType.Keyword,name = "item_price")
    private BigDecimal itemPrice;

    /**
     * 新车含税价
     */
    @Field(type = FieldType.Keyword,name = "item_new_price")
    private BigDecimal itemNewPrice;

    /**
     * 过户次数
     */
    @Field(type = FieldType.Keyword,name = "item_change_number")
    private Integer itemChangeNumber;

    /**
     * 排量
     */
    @Field(type = FieldType.Keyword,name = "item_displacement")
    private BigDecimal itemDisplacement;

    /**
     * 年检到期
     */
    @Field(type = FieldType.Date,format = DateFormat.date,name = "item_annual_inspection_date")
    private Date itemAnnualInspectionDate;

    /**
     * 使用性质
     */
    @Field(type = FieldType.Keyword,name = "item_function")
    private String itemFunction;

    /**
     * 交强险到期
     */
    @Field(type = FieldType.Date,format = DateFormat.date,name = "item_mlifta_date")
    private Date itemMliftaDate;

    /**
     * 车身颜色(黑色:1,白色2,银色:3,红色:4,蓝色:5.....)
     */
    @Field(type = FieldType.Keyword,name = "item_color")
    private Integer itemColor;

    /**
     * 出厂日期
     */
    @Field(type = FieldType.Date,format = DateFormat.date,name = "item_production_date")
    private Date itemProductionDate;

    /**
     * 车源号
     */
    @Field(type = FieldType.Keyword,name = "item_options")
    private Long itemOptions;

    /**
     * 钥匙数量
     */
    @Field(type = FieldType.Keyword,name = "item_key_num")
    private Integer itemKeyNum;

    /**
     * 车辆级别(三厢车:1,两厢车:2)
     */
    @Field(type = FieldType.Keyword,name = "item_rank")
    private Integer itemRank;

    /**
     * 座位数
     */
    @Field(type = FieldType.Keyword,name = "item_seating")
    private Integer itemSeating;

    /**
     * 车龄
     */
    @Field(type = FieldType.Keyword,name = "item_car_age")
    private Long itemCarAge;

    /**
     * 车牌所在地(本地车牌:1,本省车源:2,本地车源:3)
     */
    @Field(type = FieldType.Keyword,name = "item_location_license_plate")
    private Integer itemLocationLicensePlate;

    /**
     * 能源类型(汽油:1,电动:2,油电混动:3)
     */
    @Field(type = FieldType.Keyword,name = "item_energy_sources")
    private Integer itemEnergySources;

    /**
     * 变速箱(手动:1,自动:2)
     */
    @Field(type = FieldType.Keyword,name = "item_gearbox")
    private Integer itemGearbox;

    /**
     * 气缸数量(3缸:1,4缸:2,6缸:3,8缸及以上:4)
     */
    @Field(type = FieldType.Keyword,name = "item_air_cylinder")
    private Integer itemAirCylinder;

    /**
     * 进气方式(自然吸气:1,涡轮增压:2,机械增压:3)
     */
    @Field(type = FieldType.Keyword,name = "item_air_inlet")
    private Integer itemAirInlet;

    /**
     * 驱动类型(两驱:1,四驱:2)
     */
    @Field(type = FieldType.Keyword,name = "item_driving_type")
    private Integer itemDrivingType;

    /**
     * 国别(德系:1,日系:2)
     */
    @Field(type = FieldType.Keyword,name = "item_contry")
    private Integer itemContry;

    /**
     * 年款(2010:1,2011:2,2012:3...)
     */
    @Field(type = FieldType.Keyword,name = "item_year_type")
    private Integer itemYearType;

    /**
     * 状态(待评估:1,评估通过:2,下架:3)
     */
    @Field(type = FieldType.Keyword,name = "order_status")
    private Integer orderStatus;

    /**
     * 创建时间
     */
    @Field(type = FieldType.Date,format = DateFormat.date,name = "item_create_time")
    private Date itemCreateTime;

    /**
     * 图片
     */
    @Field(type = FieldType.Keyword,name = "item_img")
    private String itemImg;

    /**
     * 点击量
     */
    @Field(type = FieldType.Keyword,name = "item_hits")
    private Long itemHits;


}
